﻿using Autofac.Extras.DynamicProxy;
using netcore_comm.Polly;
using netcore_service.Dto;
using netcore_service.Model;
using Panda.DynamicWebApi;
using Panda.DynamicWebApi.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace netcore_service.IService
{
    /// <summary>
    /// 
    /// </summary>
    [DynamicWebApi]
    public interface ISchoolService : IDynamicWebApi
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<SchoolInfo>> SchoolInfoById(string Id);
        Task<ApiResult<SchoolInfoDto>> SchoolById(string Id, string uid = "");
        /// <summary>
        /// 列表查询
        /// </summary>
        /// <param name="po"></param>
        /// <returns></returns>
        Task<ApiResult<dynamic>> SchoolInfoList(SchoolInfoPo po);
        Task<ApiResult<List<SchoolInfoDtoM>>> SchoolList(SchoolInfoPo po);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="schoolInfo"></param>
        /// <returns></returns>
        Task<ApiResult<string>> SchoolInfoAddOrUpdate(SchoolInfo schoolInfo);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<ApiResult<string>> SchoolInfoDel(string Id);
        /// <summary>
        /// 根据ID和类型获取详情信息
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        Task<ApiResult<SchoolDetailDto>> SchoolDetail(string Id, string type);
        /// <summary>
        /// Top 10 搜索
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<dynamic>> GetSchoolCountTop(string type);

        Task<ApiResult<int>> AddCollection(Collection data);

        Task<ApiResult<List<SchoolInfoDto>>> GetSchoolCountByOpenid(string type, string uid);

        Task<ApiResult<int>> cancelCollect(string Id, string Uid);

        Task<ApiResult<bool>> getCollectionbyId(string schoolId, string uid);
    }
}
